@extends('layout')
@section('content')
<div class="box box-info">
		                
					
                       
						
                        <div class="box-header with-border">
                            <h3 class="box-title">Horizontal Form</h3>
                        </div><!-- /.box-header -->
                        <!-- form start -->
			             <div class="col-md-3 col-md-offset-3">
                               @if (count($errors) > 0)
								    <div class="alert alert-danger">
								        <ul>
								            @foreach ($errors->all() as $error)
								                <li>{{ $error }}</li>
								            @endforeach
								        </ul>
								    </div>
								@endif

		                  </div>
                        
		                  
		               
                        <form class="form-horizontal" action='{{asset("Admin/goods/insert")}}'  method='post' enctype="multipart/form-data" >
                        	

                            <div class="box-body">

                                <div class="form-group">
                                    <label class="col-sm-5 control-label"  >商品名</label>
                                    <div class="col-sm-5">
                                        <input type="text" name='name' value='{{old("name")}}' placeholder="Password" id="inputPassword3" class="form-control">
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-5 control-label" for="inputPassword3" >价位</label>
                                    <div class="col-sm-5">
                                        <input type="text" name='price' value='{{old("price")}}' placeholder="Password" id="inputPassword3" class="form-control">
                                    </div>
                                </div>
                                 <div class='col-md-5 col-md-offset-5'>
                                <div class="form-group">
                                    <label>父类</label>
                                    <select class="form-control" name='cate_id'>
                                        @foreach($data as $info)
                                        <option value='{{$info->id}}'>{{$info->name}}</option>
                                        
                                        @endforeach
                                        <option value='0'>根目录</option>
                                    </select>
                                </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-5 control-label" for="inputPassword3" for="exampleInputFile">图片上传</label>
                                    <input type="file" name='img'   id="exampleInputFile">
                                    <p class="help-block">图片上传</p>
                                </div>
                               
                                
                                <!-- 加载编辑器的容器 -->
                                <div>
                                <script id="container" style="width:1000px;height:150px;float:right;margin-left:280px;" name="details" type="text/plain">
                                    这里写你的初始化内容
                                </script>
                                <!-- 配置文件 -->
                                <script type="text/javascript" src="/ue/ueditor.config.js"></script>
                                <!-- 编辑器源码文件 -->
                                <script type="text/javascript" src="/ue/ueditor.all.js"></script>
                                <!-- 实例化编辑器 -->
                                <script type="text/javascript">
                                    var ue = UE.getEditor('container');
                                </script>
                                </div>
                                 
                               
                           
                                  
                                 <!-- 加载编辑器的容器 -->
                                

                                {{csrf_field()}}
                                
                            <div class="box-footer">
                            <div class="col-sm-offset-5 col-sm-4">
                                <button class="btn btn-default" type="submit">Cancel</button>
                                <button class="btn btn-info pull-right" type="submit">添加</button>
                            </div><!-- /.box-footer -->
                        </form>
                    </div>


@endsection